package com.dgut.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class MainController {
    //⾸⻚
    @RequestMapping({"/index", "/", ""})
    public String index() {
        return "index";
    }

    ////登录页
    //@GetMapping("/login")
    //public String login() {
    //    // 响应⼀个登录⻚⾯ classpath: /templates/login.html
    //    return "login";
    //}

    //测试
    @RequestMapping("/hello")
    @ResponseBody
    public String hello() {
        System.out.println("Hello");
        return "hello security";
    }
}
